my97datepicker
- 官網:http://www.my97.net/
- 安裝:
<!-- 調用 WdatePicker.js http://www.my97.net/demo/index.htm -->
<link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/my97datepicker@4.8.0/skin/WdatePicker.css'>
<script src='https://cdn.jsdelivr.net/npm/my97datepicker@4.8.0/WdatePicker.js'></script>
<script src="https://cdn.jsdelivr.net/npm/my97datepicker@4.8.0/lang/zh-tw.js"></script>
- 在input中加入:
onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss' })"
- 其他常用參數:
(1) 語系:lang:'zh-tw'
(2) 佈景:skin:'whyGreen'
(3) 民國年:dateFmt:'民國yyy年MM月dd日'
(4) 含時間:dateFmt:'yyyy-MM-dd HH:mm:ss'
(5) 起始日期:startDate:'1980-05-01' 或 startDate:'%y-%M-%d %H:%m:%s'
(6) 星期一維第一天:firstDayOfWeek:1
(7) 最小日期:minDate:'2006-09-10' 或 minDate:'%y-%M-{%d+2} %H:%m:%s'
(8) 最大日期:maxDate:'2008-12-20'
(8) 週休禁止:disabledDays:[0,6]
- 日期時間
<div class="col-md-2 mb-3">
<label>日期時間</label>
<input type="text" class="form-control WdateFmtErr" name="f2" id="f2" value="" onclick="WdatePicker({dateFmt:'yyyy/MM/dd HH:mm:ss', startDate:' %y/%M/%d %H:%m:%s'})" autocomplete="off" placeholder="">
</div>
- 日期
<div class="col-md-3 mb-3">
<label>日期</label>
<input type="text" class="form-control" name="f3" id="f3" value="" onclick="WdatePicker({dateFmt:'yyyy/MM/dd', startDate:' %y/%M/%d'})" autocomplete="off" placeholder="">
</div>
- 時間
<div class="col-md-2 mb-3">
<label>時間</label>
<input type="text" class="form-control" name="f4" id="f4" value="" onclick="WdatePicker({dateFmt:'HH:mm:ss', startDate:'%H:%m:%s'})" autocomplete="off" placeholder="">
</div>